#ifndef _SPINLOCK_H
#define _SPINLOCK_H

#include "types.h"

struct spinlock {
    int   locked;
    char *name;
};

void os_spin_init(struct spinlock *lock, char *name);
int  os_spin_lock(struct spinlock *lock, u32 *pflags);
int  os_spin_unlock(struct spinlock *lock, u32 flags);

#endif /* _SPINLOCK_H */